/* ========================================================================= */
/* ------------------------------------------------------------------------- */
/*!
  \file			apppaths.h
  \date			Jan 2013
  \author		TNick

  \brief		Contains the definition for AppPaths class


*//*


 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Please read COPYING and README files in root folder
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
#ifndef __APPPATHS_INC__
#define __APPPATHS_INC__
//
//
//
//
/*  INCLUDES    ------------------------------------------------------------ */

#include	<memtrack.h>
#include	<QString>

/*  INCLUDES    ============================================================ */
//
//
//
//
/*  CLASS    --------------------------------------------------------------- */

/**
*	@brief	Gets paths for various os'es
*
*	@section Windows
*
*	The following structure is assumed:
*			- Application Directory
*				- executable
*				- /help
*					- man file
*					- help file
*				- /lang
*					- ProLitEd_ro_RO.qm
*					- other.qm
*
*	@section Unix
*
*	The following structure is assumed:
*			- $(DESTDIR)$(PREFIX)
*				- /bin
*					- (executable)
*				- /share
*					- /man/man1
*						- man file
*					- /doc/(package)
*						- help file
*						- ProLitEd_ro_RO.qm
*						- other.qm
*
*	@section Darwin
*
*	Unknown structure
*
*/
class AppPaths		: public MemTrack		{
	BBM_TRACK( AppPaths );

	//
	//
	//
	//
	/*  DEFINITIONS    ----------------------------------------------------- */

	/*  DEFINITIONS    ===================================================== */
	//
	//
	//
	//
	/*  DATA    ------------------------------------------------------------ */

private:


	/**
	*	@brief	the name of the executable (including extension, if any)
	*/
	QString		s_app_name_;


	/**
	*	@brief	the name of the package
	*/
	QString		s_package_;



	/**
	*	@brief	path (without file name) of the executable
	*/
	QString		s_exe_path_;


	/**
	*	@brief	path (without file name) of the man page
	*/
	QString		s_man_path_;


	/**
	*	@brief	path (without file name) of the help file
	*/
	QString		s_help_path_;


	/**
	*	@brief	path of the language files
	*/
	QString		s_lang_path_;


	/**
	*	@brief	the one and only instance
	*/
	static AppPaths *	uniq_;


	/*  DATA    ============================================================ */
	//
	//
	//
	//
	/*  FUNCTIONS    ------------------------------------------------------- */

private:


	/**
	*	@brief	constructor;
	*/
	AppPaths			(
			const QString &			s_app_name,
			const QString &			s_package
			);


	/**
	*	@brief	destructor;
	*/
	~AppPaths			( void );


public:


	/**
	*	@brief	initialisation
	*/
	static bool			init					(
			const QString &			s_app_name,
			const QString &			s_package
			);


	/**
	*	@brief	termination
	*/
	static void			end						( void );


	/**
	*	@brief	termination
	*/
	static AppPaths *	unique					( void )
	{ return uniq_; }





	/**
	*	@brief	path (without file name) of the executable
	*/
	QString				exePath					( void )
	{ return s_exe_path_; }


	/**
	*	@brief	path (without file name) of the man page
	*/
	QString				manPath					( void )
	{ return s_man_path_; }


	/**
	*	@brief	path (without file name) of the help file
	*/
	QString				helpPath				( void )
	{ return s_help_path_; }


	/**
	*	@brief	path for language files
	*/
	QString				langPath				( void )
	{ return s_lang_path_; }


	/**
	*	@brief	get the path of assistant / help viewer
	*/
	QString				assistantPath			( void );



	/*  FUNCTIONS    ======================================================= */
	//
	//
	//
	//

};	/*	class AppPaths	*/

/*  CLASS    =============================================================== */
//
//
//
//
#endif // __APPPATHS_INC__
/* ------------------------------------------------------------------------- */
/* ========================================================================= */
